import React from 'react'

import Star from '../star'

import './style.scss'

class DetailInfo extends React.Component{
    constructor(props, context){
        super(props, context)
    }
    render() {
        const data = this.props.data
        return (
            <div className="info-box">
                <div className="top clearfix">
                    <img src={data.img} style={{width: '120px'}}/>
                    <div className="top-right">
                        <h2 className='title'>{data.title}</h2>
                        <div className='star-price'>
                            <Star star={data.start}></Star>
                            <span className='price'>￥{data.price}</span>
                        </div>
                        <p>{data.subTitle}</p>
                    </div>
                </div>
                <div className='bottom'>
                    <p dangerouslySetInnerHTML={{__html:data.desc}}></p>
                </div>
            </div>
        )
    }
    componentDidMount() {
        
    }
}

export default DetailInfo